package com.volvo.caretrack.mobile.actions;

import java.util.Map;
import com.volvo.caretrack.mobile.model.auth.Session;
import com.volvo.caretrack.mobile.services.AuthenticationService;
import com.volvo.caretrack.mobile.util.ParamUtil;

public class LoginAction extends BaseAction {

	@Override
	public Object loadData(String sessionID, Map params) throws Exception {
		String user = ParamUtil.getParam(params, "username");
		String password = ParamUtil.getParam(params, "password");
		Session session = AuthenticationService.getInstance().login(user, password);
		return session;
	}

}
